package com.shop.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * 商品sku 实体类。
 *
 * @author 彭新才
 * @since 2024-10-12
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "商品sku")
@Table(value = "shop_product_sku")
public class ShopProductSku implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 产品规格id
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "产品规格id")
    private Long id;

    /**
     * 产品id
     */
    @Schema(description = "产品id")
    private Long productId;

    /**
     * 产品sku记录索引 (由规格id组成)
     */
    @Schema(description = "产品sku记录索引 (由规格id组成)")
    private String templateId;

    /**
     * 产品编码
     */
    @Schema(description = "产品编码")
    private String productNo;

    /**
     * 产品价格
     */
    @Schema(description = "产品价格")
    private BigDecimal productPrice;

    /**
     * 产品划线价
     */
    @Schema(description = "产品划线价")
    private BigDecimal linePrice;

    /**
     * 产品底价
     */
    @Schema(description = "产品底价")
    private BigDecimal lowPrice;

    /**
     * 当前库存数量
     */
    @Schema(description = "当前库存数量")
    private Long stockNum;

    /**
     * 产品销量(废弃)
     */
    @Schema(description = "产品销量(废弃)")
    private Long productSales;

    /**
     * 产品重量(Kg)
     */
    @Schema(description = "产品重量(Kg)")
    private Double productWeight;

    /**
     * 供应商价格
     */
    @Schema(description = "供应商价格")
    private BigDecimal supplierPrice;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Timestamp createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private Timestamp updateTime;

}
